<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="title" content="惊蛰自用小图床">
    <meta name="keywords" content="惊蛰,图床，免费图床,免费图片托管服务,码云">
    <meta name="description" content="使用码云的api达到免费图床的作用-免费图片托管服务">
    <title>个人中心</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <!-- 引入 layui.css -->
    <link href="https://www.layuicdn.com/layui/css/layui.css" rel="stylesheet">
    <!-- 引入 layui.js -->
    <script src="https://cdn.bootcdn.net/ajax/libs/layui/2.6.8/layui.min.js"></script>
    <style>

    </style>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery-backstretch/2.0.4/jquery.backstretch.min.js">
    </script>
    <script src="https://cdn.bootcdn.net/ajax/libs/clipboard.js/2.0.8/clipboard.min.js"></script>
    <script src="/js/index.js"></script>
    <style>
        ul {
            display: flex;
            flex-wrap: nowrap;
            justify-content: flex-end;
        }

        ul>li:first-child {
            position: absolute !important;
            left: 25px;
        }

        .layui-input-block {
            padding: 0px 50px 0px 0px;
        }

        .form-div {
            max-width: 500px;
            margin: 0 auto;
        }
    </style>
</head>

<body>
    <div>
        <ul class="layui-nav">
            <li class="layui-nav-item"><a href="/">免费图床</a></li>
            <li class="layui-nav-item"><a href="https://gitee.com/jingzhewl/code-cloud-chart-bed-code">本站源码</a></li>
            <li class="layui-nav-item"><a href="/">主页</a></li>
            <li class="layui-nav-item"><a href="fileList">图库</a></li>
            <li class="user-center layui-nav-item layui-this" style="display: none;">
                <a href="javascript:;">个人中心</a>
                <dl class="layui-nav-child">
                    <dd><a href="/user">个人信息</a></dd>
                    <dd><a href="">修改密码</a></dd>
                    <dd><a href="javascript:;" onclick="loginout()">退出</a></dd>
                </dl>
            </li>
            <li class="user-center layui-nav-item" style="display: none;">
                <a href="/login">登录</a>
            </li>
        </ul>
    </div>
    <div class="form-div">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>个人信息</legend>
        </fieldset>

        <form class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">邮箱</label>
                <div class="layui-input-block">
                    <input type="text" name="email" readonly lay-verify="email" autocomplete="off"
                        placeholder="" class="layui-input" value="">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">token</label>
                <div class="layui-input-block">
                    <input type="text" name="token" lay-verify="token" autocomplete="off" placeholder="请输入token" value=""
                        class="layui-input">
                    <span>点我了解如何申请token</span>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">owner</label>
                <div class="layui-input-block">
                    <input type="text" name="owner" lay-verify="owner" autocomplete="off" placeholder="请输入owner" value=""
                        class="layui-input">
                    <span>注：仓库所属空间地址</span>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">repo</label>
                <div class="layui-input-block">
                    <input type="text" name="repo" lay-verify="repo" autocomplete="off" placeholder="请输入repo" value=""
                        class="layui-input">
                    <span>注：仓库路径(path)</span>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">branch</label>
                <div class="layui-input-block">
                    <input type="text" name="branch" lay-verify="branch" autocomplete="off" placeholder="请输入branch" value=""
                        class="layui-input">
                    <span>注：分支名称。默认为仓库对默认分支（master）</span>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <a class="layui-btn" onclick="saveOrUpdateToekn()" lay-filter="demo1">立即更改</a>
                </div>
            </div>
        </form>
    </div>
    <script>
        $("input[name=email]").attr('placeholder',window.sessionStorage.getItem('email'));
        $("input[name=email]").val(window.sessionStorage.getItem('email'));
        $("input[name=token]").val(window.sessionStorage.getItem('token'));
        $("input[name=owner]").val(window.sessionStorage.getItem('owner'));
        $("input[name=branch]").val(window.sessionStorage.getItem('branch'));
        $("input[name=repo]").val(window.sessionStorage.getItem('repo'));
    </script>
</body>

</html>